﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpMUD.Framework.IO.HumanInterface.Terminal
{
    public interface IInteractiveTerminal
        : IOutputTerminal
    {
        System.Text.Encoding InputEncoding { get; set; }

        /// <summary>
        /// Reads the first byte from the processed input buffer. If no data
        /// is available, then Null is returned.
        /// </summary>
        /// <returns>The first byte from the input buffer. If no
        /// data is available, then Null is returned.</returns>
        Nullable<byte> Read();

        /// <summary>
        /// Reads a full line of text, terminated with a newline, from the input buffer
        /// </summary>
        /// <returns>If no newline is encountered, Null is returned and the buffer is
        /// unchanged. Otherwise, all (or any) text until the first newline is returned.</returns>
        string ReadLine();

        /// <summary>
        /// Reads all text from the processed input buffer. If there is no text
        /// in the processed input buffer, then String.Empty is returned.
        /// </summary>
        string ReadToEnd();
        
        
        void Beep();
        void Clear();
        
    }
}
